Inserts a toolbar item or items before item with id=<span class="argument">before</span>.

<div class="definition">
    insert(before, items)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>before</td>
        <td><b>string</b>, id of the item to insert before</td>
    </tr>
    <tr>
        <td>items</td>
        <td><b>object</b> or <b>array</b>, toolbar items to add</td>
    </tr>
    </table>
</div>
Returns <i>undefined</i>.

<h4>Description</h4>

New items will be inserted before item with id = <span class="argument">before</span>. If <span class="argument">before</span>
is null, new items will be appended to the toolbar.
The <span class="argument">items</span> argument can be either an object or array of objects. If it is an object it
represents a toolbar item that will be added to <a class="property" href="w2toolbar.items">.items</a> array.
If it is an array then each element of the array will be treated as a separate toolbar item object.
<div style="height: 10px"></div>

If you have toolbar defined in the following way:
<textarea class="javascript">
let toolbar = new w2toolbar({
    name  : 'toolbar',
    items : [
        { type: 'check',  id: 'item1', text: 'Check', icon: 'icon-page', checked: true },
        { type: 'radio',  id: 'item3',  group: '1', text: 'Radio 1', icon: 'icon-add' },
        { type: 'radio',  id: 'item4',  group: '1', text: 'Radio 2', icon: 'icon-add' }
    ]
});
</textarea>

You can insert toolbar items:
<textarea class="javascript">
w2ui.toolbar.insert('item3', { type: 'check',  id: 'item31',  text: 'Check 2', icon: 'icon-page' });
// or
w2ui.toolbar.insert('item3', [
    { type: 'radio',  id: 'item5',  group: '1', text: 'Radio 5', icon: 'icon-add' },
    { type: 'radio',  id: 'item6',  group: '1', text: 'Radio 6', icon: 'icon-add' },
    { type: 'radio',  id: 'item7',  group: '1', text: 'Radio 7', icon: 'icon-add' }
]);
</textarea>
